#include "ConfigManager.hpp"
#include <iostream>

int main() {
    // 初始化配置管理器，加载生产环境配置
    auto& config = ConfigManager::getInstance();
    if (!config.init("production")) {
        std::cerr << "Failed to initialize config manager" << std::endl;
        return -1;
    }

    // 读取配置示例
    int cameraWidth = config.get<int>("camera.width", 1920);
    std::string modelPath = config.get<std::string>("inference.model_path");
    bool showFps = config.get<bool>("display.show_fps", false);
    
    // 读取网络配置示例
    auto networkNode = config.getNode("network");
    if (networkNode) {
        std::string tcpIp = networkNode["tcp"]["ip"].as<std::string>();
        int tcpPort = networkNode["tcp"]["port"].as<int>();
        std::cout << "TCP Server: " << tcpIp << ":" << tcpPort << std::endl;
    }

    return 0;
} 